package com.callback;


import static java.lang.Thread.sleep;

public class Friend {

    public void order(Me me) throws InterruptedException{
        System.out.println("2.朋友接到我电话，我现在和其他人约时间");

        new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    System.out.println("4.朋友正在电话联系中。。。");
                    sleep(7000);
                    System.out.println("5.朋友已经约好了，准备给我大电话");
                    me.noticeMe();
                }catch (InterruptedException e){
                    e.printStackTrace();
                }
            }
        }).start();

        new Thread(()->{
            System.out.println("你好");
        }).start();
    }

    public void order(String str){
        System.out.println("测试数据的输出顺序");
    }

    public void order(String str,int ints){
        System.out.println("dads");
    }

    public void order(String str,String st1,String df){
        System.out.println("测试输出的数据");
    }

    public void order(String er,String d,int[] ch){
        System.out.println("ieyasu");
    }




}
